import { Component, OnInit } from '@angular/core';
import { FormGroup, FormControl, Validators} from '@angular/forms';

@Component({
  selector: 'app-profile-editor',
  templateUrl: './profile-editor.component.html',
  styleUrls: ['./profile-editor.component.css']
})
export class ProfileEditorComponent implements OnInit {

  profileForm = new FormGroup({
    firstName: new FormControl('', ),
    lastName: new FormControl(''),
    address: new FormGroup(
      {
        city: new FormControl('fuzhou'),
        street: new FormControl('jinshan'),
      }
    ),
  });

  get name() { return this.profileForm.get('firstName'); }

  
  constructor() { }

  ngOnInit() {
  }




}



function forbiddenNameValidator(nameRe: RegExp) {
  
}
